package org.example.market.mapper;

import org.example.market.entity.Role;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;

@Mapper
public interface RoleMapper {
    // 基础 CRUD 方法
    int insertRole(Role role);
    int deleteRoleById(Long id);
    int updateRole(Role role);
    Role getRoleById(Long id);
    List<Role> listAllRoles();

    // 业务扩展方法
    Role getRoleByCode(String roleCode);
    List<Role> getRolesByName(String roleName);
}